import { axios, jobAxios } from '@/utils/request'

/**
 * 采集日志
 *
 * @author yang
 * @date 2021-06-03 22:50:57
 */
export function logMonitoringList(parameter) {
  parameter['jobGroup'] = 0
  parameter['jobId'] = 0
  parameter['logStatus'] = -1
  parameter['current'] = parameter['pageNo']
  parameter['size'] = parameter['pageSize']
  return axios({
    url: '/api/log/pageList',
    method: 'get',
    params: parameter
  })
}

/**
 * 数据融合
 *
 * @author yang
 * @date 2021-06-03 22:50:57
 */
export function xJobLogMonitoringList(parameter) {
  const pageNo = parseInt(parameter.pageNo)
  const pageSize = parseInt(parameter.pageSize)
  parameter['jobGroup'] = 2
  parameter['logStatus'] = 4
  parameter['start'] = (pageNo - 1) * pageSize
  parameter['jobId'] = 0
  parameter['length'] = pageSize
  return jobAxios({
    url: 'joblog/pageList',
    method: 'get',
    params: parameter
  })
}

/**
 * 日志详情
 *
 * @author yang
 * @date 2021-06-03 22:50:57
 */
export function logMonitoringDetail(parameter) {
  return axios({
    url: '/api/log/logDetailCat',
    method: 'get',
    params: parameter
  })
}

/**
 * 日志详情
 *
 * @author yang
 * @date 2021-06-03 22:50:57
 */
export function jobLogMonitoringDetail(parameter) {
  return jobAxios({
    url: 'joblog/logDetailCat',
    method: 'get',
    params: parameter
  })
}
